/*
 * @brief: 
 * @Author: TzzzT
 * @Date: 2022-05-24 13:42:11
 * @LastEditTime: 2022-05-28 20:15:00
 * @LastEditors: TzzzT
 */

#pragma once

#include "RCS_master.h"

#define GPIO_OUTPUT_PIN_SEL 2

typedef struct led_s
{
    bool state;
    uint16_t delay_time;
}led_t;

#define LED_GAP_TIME 1000

void led_init(void);

void set_led_val(bool s_led_state);

void waitGameStart_noConnect_state_handle(bool first_comein, uint8_t low_batt, led_t* led);

void scanning_state_handle(led_t* led);

void waitGameStart_connect_state_handle(bool new_comein, bool low_batt, led_t* led);

void gaming_state_handle(bool first_comein, bool team, bool living, led_t* led);

void led_event_handle(rcs_event_t* event, led_t* led);
